// 首頁
import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Index from '@/components/Index'
import ActFormData from '@/components/act/ActFormData'
import ActAdd from '@/components/act/ActAdd'
import Company from '@/components/company/Company'

Vue.use(Router);

const routes = [{
    path:'/',
    redirect:'/login'
},{
    path: "/index",
    component: Index,
    children:[{
            path:'/actmanage',
            component:ActFormData
        },
        {
            path:'/actadd',
            component:ActAdd
        },
        {
            path:'/company',
            component:Company
        }
    ]
},{
    path:'/login',
    component:Login
}];

const router = new Router({
    scrollBehavior: () => ({ y: 0 }),
    mode: 'history',
    base: '/vframe/wxactpop/',
    routes
})
export default router